package com.ybwh.springboot2;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.transaction.annotation.EnableTransactionManagement;

import java.util.Date;

@Slf4j
@SpringBootApplication
@EnableTransactionManagement
@EnableAspectJAutoProxy(exposeProxy = true)
public class Springboot2Application implements CommandLineRunner {

    public static void main(String[] args) {
        SpringApplication.run(Springboot2Application.class, args);
    }

    @Override
    public void run(String... args) throws Exception {

        log.error("----------------error-----------------");
        log.warn("----------------warn-----------------");
        log.info("----------------info-----------------");
        log.debug("----------------debug-----------------");
        log.trace("----------------trace-----------------");
        System.out.println(args);




        while (true) {
            Thread.sleep(1000);
        }
    }
}
